home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 7 / PC World Interactive 7.iso / program / vbkontrol.exe / EXPVBX22.ZIP / EXPRAPP1.FRM < prev    next >
Text File  |  1995-06-24  |  5KB  |  152 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   1845
  5.    ClientLeft      =   1725
  6.    ClientTop       =   1380
  7.    ClientWidth     =   4695
  8.    Height          =   2220
  9.    Icon            =   EXPRAPP1.FRX:0000
  10.    Left            =   1680
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   1845
  13.    ScaleWidth      =   4695
  14.    Top             =   1050
  15.    Width           =   4785
  16.    Begin CommandButton Command2 
  17.       Caption         =   "Test dll file"
  18.       Height          =   375
  19.       Left            =   2400
  20.       TabIndex        =   8
  21.       Top             =   1320
  22.       Width           =   1455
  23.    End
  24.    Begin Expr Expr1 
  25.       IsNumExpr       =   0   'False
  26.       Left            =   3360
  27.       NumValue        =   0
  28.       StrInput        =   ""
  29.       StrLength       =   0
  30.       Top             =   840
  31.    End
  32.    Begin CommandButton Command1 
  33.       Caption         =   "Call Expr.vbx"
  34.       Height          =   375
  35.       Left            =   240
  36.       TabIndex        =   2
  37.       Top             =   1320
  38.       Width           =   1455
  39.    End
  40.    Begin TextBox Text1 
  41.       Height          =   285
  42.       Left            =   120
  43.       TabIndex        =   0
  44.       Text            =   "aae=12, cat(string(a,2),ltrim(string(e,6),1))"
  45.       Top             =   150
  46.       Width           =   4455
  47.    End
  48.    Begin Label Label4 
  49.       FontBold        =   -1  'True
  50.       FontItalic      =   0   'False
  51.       FontName        =   "MS Sans Serif"
  52.       FontSize        =   9.75
  53.       FontStrikethru  =   0   'False
  54.       FontUnderline   =   0   'False
  55.       Height          =   255
  56.       Left            =   1800
  57.       TabIndex        =   7
  58.       Top             =   720
  59.       Width           =   615
  60.    End
  61.    Begin Label Label3 
  62.       Caption         =   "Is Numeric express?"
  63.       FontBold        =   -1  'True
  64.       FontItalic      =   0   'False
  65.       FontName        =   "MS Sans Serif"
  66.       FontSize        =   9.75
  67.       FontStrikethru  =   0   'False
  68.       FontUnderline   =   0   'False
  69.       Height          =   255
  70.       Left            =   120
  71.       TabIndex        =   6
  72.       Top             =   720
  73.       Width           =   1935
  74.    End
  75.    Begin Label Label1 
  76.       Caption         =   "Value is:"
  77.       FontBold        =   -1  'True
  78.       FontItalic      =   0   'False
  79.       FontName        =   "MS Sans Serif"
  80.       FontSize        =   9.75
  81.       FontStrikethru  =   0   'False
  82.       FontUnderline   =   0   'False
  83.       Height          =   255
  84.       Left            =   120
  85.       TabIndex        =   5
  86.       Top             =   480
  87.       Width           =   975
  88.    End
  89.    Begin Label Label2 
  90.       FontBold        =   -1  'True
  91.       FontItalic      =   0   'False
  92.       FontName        =   "MS Sans Serif"
  93.       FontSize        =   9.75
  94.       FontStrikethru  =   0   'False
  95.       FontUnderline   =   0   'False
  96.       Height          =   375
  97.       Left            =   1560
  98.       TabIndex        =   4
  99.       Top             =   480
  100.       Width           =   1815
  101.    End
  102.    Begin Label Label6 
  103.       FontBold        =   -1  'True
  104.       FontItalic      =   0   'False
  105.       FontName        =   "MS Sans Serif"
  106.       FontSize        =   9.75
  107.       FontStrikethru  =   0   'False
  108.       FontUnderline   =   0   'False
  109.       Height          =   315
  110.       Left            =   1800
  111.       TabIndex        =   3
  112.       Top             =   960
  113.       Width           =   795
  114.    End
  115.    Begin Label Label5 
  116.       Caption         =   "Length is:"
  117.       FontBold        =   -1  'True
  118.       FontItalic      =   0   'False
  119.       FontName        =   "MS Sans Serif"
  120.       FontSize        =   9.75
  121.       FontStrikethru  =   0   'False
  122.       FontUnderline   =   0   'False
  123.       Height          =   390
  124.       Left            =   120
  125.       TabIndex        =   1
  126.       Top             =   960
  127.       Width           =   1050
  128.    End
  129. End
  130. Declare Function chkexpr Lib "expr.dll" (ByVal S As String) As Integer
  131. Declare Function expres Lib "expr.dll" (ByVal S As String) As Double
  132.  
  133. Sub Command1_Click ()
  134.     Expr1.StrInput = text1.Text
  135.     Label6.Caption = Expr1.StrLength
  136. '    test vbx file
  137.     Label2.Caption = Expr1.NumValue
  138.     If Expr1.IsNumExpr Then Label4 = "True" Else Label4 = "False"
  139. End Sub
  140.  
  141. Sub Command2_Click ()
  142. '    test dll file
  143.     Label6.Caption = Len(text1)
  144.     Label2.Caption = expres(text1)
  145.     If Not chkexpr(text1) Then Label4 = "True" Else Label4 = "False"
  146. End Sub
  147.  
  148. Sub Form_Unload (Cancel As Integer)
  149.     Unload form2
  150. End Sub
  151.  
  152.